﻿<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<link type="text/css" rel="stylesheet" href="css/stylesheet.css" />
</h:head>

<h:body>
	<h:form>
		<p:growl id="growl" life="3000" />
		<p:scrollPanel mode="native" style="width:100%;height:100%;">
			<p:fieldset legend="Cadastrar logradouro">
				<p:wizard flowListener="#{logradouroBean.onFlowProcess}">
					<p:tab title="Básico">
						<p:panel
							header="Informações sobre o nome, ano de criação, tipo e origem">
							<p:messages />
							<h:panelGrid columns="2" columnClasses="label, value">
								<h:outputText value="Título:" />
								<p:inputText required="true"
									requiredMessage="Título do logradouro não informado!" size="50"
									value="#{logradouroBean.logradouro.nomeLogradouro}" />

								<h:outputText value="Ano de criação:" />
								<p:inputMask required="true" mask="9999"
									requiredMessage="Ano de criação do logradouro não informado!"
									value="#{logradouroBean.logradouro.anoCriacaoLogradouro}" />

								<h:outputText value="Tipo: " />
								<p:selectOneMenu
									value="#{logradouroBean.logradouro.tipoLogradouro}">
									<f:selectItem itemLabel="ALT" itemValue="ALT" />
					﻿  ﻿  ﻿              			<f:selectItem itemLabel="AV" itemValue="AV" />
					﻿  ﻿  ﻿              			<f:selectItem itemLabel="BEC"
										itemValue="BEC" />
									<f:selectItem itemLabel="C" itemValue="C" />
									<f:selectItem itemLabel="CAN" itemValue="CAN" />
									<f:selectItem itemLabel="COR" itemValue="COR" />
									<f:selectItem itemLabel="LAD" itemValue="LAD" />
									<f:selectItem itemLabel="LGO" itemValue="LGO" />
									<f:selectItem itemLabel="MOR" itemValue="MOR" />
									<f:selectItem itemLabel="PR" itemValue="PR" />
									<f:selectItem itemLabel="PTE" itemValue="PTE" />
									<f:selectItem itemLabel="PAT" itemValue="PAT" />
									<f:selectItem itemLabel="PRC" itemValue="PRC" />
									<f:selectItem itemLabel="PRQ" itemValue="PRQ" />
									<f:selectItem itemLabel="RUA" itemValue="RUA" />
									<f:selectItem itemLabel="ROD" itemValue="ROD" />
									<f:selectItem itemLabel="SUB" itemValue="SUB" />
									<f:selectItem itemLabel="1SB" itemValue="1SB" />
									<f:selectItem itemLabel="2SB" itemValue="2SB" />
									<f:selectItem itemLabel="3SB" itemValue="3SB" />
									<f:selectItem itemLabel="4SB" itemValue="4SB" />
									<f:selectItem itemLabel="5SB" itemValue="5SB" />
									<f:selectItem itemLabel="6SB" itemValue="6SB" />
									<f:selectItem itemLabel="7SB" itemValue="7SB" />
									<f:selectItem itemLabel="TRV" itemValue="TRV" />
									<f:selectItem itemLabel="1TR" itemValue="1TR" />
									<f:selectItem itemLabel="2TR" itemValue="2TR" />
									<f:selectItem itemLabel="3TR" itemValue="3TR" />
									<f:selectItem itemLabel="4TR" itemValue="4TR" />
									<f:selectItem itemLabel="5TR" itemValue="5TR" />
									<f:selectItem itemLabel="6TR" itemValue="6TR" />
									<f:selectItem itemLabel="7TR" itemValue="7TR" />
									<f:selectItem itemLabel="8TR" itemValue="8TR" />
									<f:selectItem itemLabel="9TR" itemValue="9TR" />
									<f:selectItem itemLabel="10T" itemValue="10t" />
									<f:selectItem itemLabel="ENT" itemValue="ENT" />
									<f:selectItem itemLabel="ESC" itemValue="ESC" />
									<f:selectItem itemLabel="EST" itemValue="EST" />
									<f:selectItem itemLabel="ILH" itemValue="ILH" />
									<f:selectItem itemLabel="JAR" itemValue="JAR" />
								</p:selectOneMenu>

								<h:outputText value="Origem:" />
								<p:selectOneRadio
									requiredMessage="Origem do logradouro não informada!"
									required="true"
									value="#{logradouroBean.logradouro.origemLogradouro}">
							﻿  ﻿  ﻿          	<f:selectItem itemLabel="LEI" itemValue="LEI" />
									<f:selectItem itemLabel="ATO" itemValue="ATO" />
									<f:selectItem itemLabel="DECRETO" itemValue="DECRETO" />
	﻿  ﻿  ﻿      							</p:selectOneRadio>

								<h:outputText value="Código de origem: " />
								<p:inputMask mask="999999/99" required="true"
									requiredMessage="Código de origem do logradouro não informado!"
									value="#{logradouroBean.logradouro.codigoOrigemLogradouro}" />

								<h:outputText value="Ano de publicação: " />
								<p:inputMask mask="9999" required="true"
									requiredMessage="Ano de publicação da origem não informado!"
									value="#{logradouroBean.logradouro.anoPublicOrigemLogradouro}" />
							</h:panelGrid>
						</p:panel>
					</p:tab>

					<p:tab title="Limites">
						<p:panel header="Informações sobre os delimitadores do logradouro">
							<p:messages />

							<h:panelGrid columns="2" columnClasses="label, value">
								<h:outputText value="Código do limite inicial:" />
								<p:inputMask mask="9?9999999" required="true"
									requiredMessage="Código do logradouro do limite inicial não informado!"
									value="#{logradouroBean.logradouro.codigoLimiteInicialLogradouro}" />

								<h:outputText value="Código do limite final:" />
								<p:inputMask mask="9?9999999" required="true"
									requiredMessage="Código do logradouro do limite inicial não informado!"
									value="#{logradouroBean.logradouro.codigoLimiteFinalLogradouro}" />

								<h:outputText value="DSQ do limite inicial:" />
								<p:inputMask mask="99.9999.9999" required="true" maxlength="12"
									requiredMessage="DSQ do limite inicial não informado!"
									value="#{logradouroBean.logradouro.dsqLimiteInicialLogradouro}" />

								<h:outputText value="DSQ do limite final:" />
								<p:inputMask mask="99.9999.9999" required="true" maxlength="12"
									requiredMessage="DSQ do limite final não informado!"
									value="#{logradouroBean.logradouro.dsqLimiteFinalLogradouro}" />

								<h:outputText value="Código da prancha do limite inicial:" />
								<p:inputMask mask="999999" required="true"
									requiredMessage="Código de prancha do limite inicial não informado!"
									value="#{logradouroBean.logradouro.pranchaLimiteInicialLogradouro}" />

								<h:outputText value="Código da prancha do limite final:" />
								<p:inputMask id="codPranchaLimiteFinal" mask="999999"
									required="true"
									requiredMessage="Código de prancha do limite final não informado!"
									value="#{logradouroBean.logradouro.pranchaLimiteFinalLogradouro}" />
							</h:panelGrid>
						</p:panel>
					</p:tab>

					<p:tab title="Confirmar">
						<p:panel header="Confirmação dos dados de cadastro do logradouro">
							<p:messages />

							<h:panelGrid columns="2" columnClasses="label, value">
								<h:outputText value="Nome: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.nomeLogradouro}" />

								<h:outputText value="Tipo: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.tipoLogradouro}" />

								<h:outputText value="Origem: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.origemLogradouro}" />

								<h:outputText value="Ano de publicação da origem: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.anoPublicOrigemLogradouro}" />

								<h:outputText value="Código do logradouro do limite inicial: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.codigoLimiteInicialLogradouro}" />

								<h:outputText value="Código do logradouro do limite final: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.codigoLimiteFinalLogradouro}" />

								<h:outputText value="DSQ do limite inicial: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.dsqLimiteInicialLogradouro}" />

								<h:outputText value="DSQ do limite final: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.dsqLimiteFinalLogradouro}" />

								<h:outputText value="Código de prancha do limite inicial: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.pranchaLimiteInicialLogradouro}" />

								<h:outputText value="Código de prancha do limite final: " />
								<h:outputText styleClass="confirmacaoSaida"
									value="#{logradouroBean.logradouro.pranchaLimiteFinalLogradouro}" />
							</h:panelGrid>

							<p:commandButton value="Cadastrar" update="growl" process="@this"
								actionListener="#{logradouroBean.salvar}" />
						</p:panel>
					</p:tab>
				</p:wizard>
			</p:fieldset>
		</p:scrollPanel>
	</h:form>
</h:body>
</html>